let { Schema, model } = require("mongoose");
// let pointsModel = require("./pointsModel")



let pointsSchema = new Schema({
    points: String
  })
  let pointsModel = model("pointsModel", pointsSchema, "points")
  
  



let TestPaperSchema = new Schema({
    topics: String, // 题目、题干
    options: Array,  // 选项 ['HTML', 'CSS', 'JS', 'Nodejs']
    answer: Number, // 正确答案的下标
    analysis: String, // 解析
    score: Number,
    pointId: {  // 题目所属知识点
        type: Schema.Types.ObjectId,
        ref: pointsModel
    }
})
let TestPaperModel = model("TestPaperModel", TestPaperSchema, "exercises")

module.exports = {TestPaperModel}